设计一个存储过程，给参加特定科目的同学加分；
要求如下，如果此科目平均分低于80，则所有人加5分，直到平均分不低于80
，并且成绩不超过100分满分。
drop PROCEDURE adds;

CREATE PROCEDURE adds
@subjectname VARCHAR(100)
AS
DECLARE  @score FLOAT(6,2)
DECLARE cursor_s CURSOR
FOR
SELECT subjectname,score
FROM s_student,s_examresult
WHERE s_examresult.sb_id = s_subject.id
OPEN cursor_s
FETCH next FROM cursor_s INTO @score
WHILE @@fetch_status = 0
BEGIN
IF AVG(@score) < 80  
label1: LOOP
    SET @score = @score + 5;
    IF AVG(@score)>80 &&AVG(@score<=100)  
    END IF;  
    LEAVE label1;
    END LOOP label1;  
    THEN ITERATE label1; 
END IF;
END